package be.kuleuven.cs.mume.objects;

import org.jbox2d.collision.shapes.PolygonDef;
import org.jbox2d.dynamics.BodyDef;
import org.jbox2d.dynamics.World;
import org.mt4j.util.math.Vector3D;

import processing.core.PApplet;
import advanced.physics.physicsShapes.PhysicsRectangle;

public class PhysicsBox extends PhysicsRectangle{
	
	private float scale;
	
	public PhysicsBox(Vector3D centerPosition, 
			float width, float height, PApplet applet,
			World world, float density, float friction, float restitution, float worldScale) {
		super(centerPosition, width, height ,applet , world, density, friction, restitution, worldScale);
		scale = worldScale;
	} 
	
	@Override
	protected void polyDefB4CreationCallback(PolygonDef def){
		
	}
	@Override
	protected void bodyDefB4CreationCallback(BodyDef def) {
		super.bodyDefB4CreationCallback(def);
//		def.linearDamping = 0.15f;
		def.linearDamping =0.5f;
		//def.isBullet = true;
		//def.angularDamping = 0.05f;

		//def.allowSleep = true;
		def.fixedRotation = true;
	}
}